Skip to content

Add cascading live dropdowns for Workspace, Client, Project and Task#53

Open
StefanHiersekorn wants to merge 8 commits into
eXpl0it3r:masterfrom
StefanHiersekorn:feature/live-dropdowns
Open

Add cascading live dropdowns for Workspace, Client, Project and Task#53
StefanHiersekorn wants to merge 8 commits into
eXpl0it3r:masterfrom
StefanHiersekorn:feature/live-dropdowns

Conversation

@StefanHiersekorn

Copy link
Copy Markdown

Summary

Today the Property Inspector requires you to type the Workspace, Client, Project and
Task names by hand and match them exactly to what exists in Clockify. A single typo
silently results in no timer being found.

This PR turns those four fields into live dropdowns populated directly from your
Clockify account, with a per-field freetext fallback so nothing is lost when manual
entry is needed.

What's new

  • Cascading dropdowns in the Property Inspector:
    • Workspace → loads its Clients and Projects
    • Client → filters the Project list
    • Project → loads its Tasks
  • Freetext toggle (✎) per field — switch any field back to manual entry (useful when
    the API is unreachable, a list is very long, or you want to create a brand-new task
    that does not exist yet).
  • Auto-load on open plus a "Refresh lists from Clockify" button.
  • Existing settings are pre-selected on open (full backward compatibility — the stored
    values remain the human-readable names, not IDs).

How it works

  • A new read-only ClockifyLookupService performs the lookups (workspaces / clients /
    projects / tasks → name lists). It is stateless and shares no state with the existing
    ClockifyService.
  • The Property Inspector talks to the plugin over the standard
    sendToPlugin / sendToPropertyInspector channel; ToggleAction handles the requests
    in OnSendToPlugin and replies via SendToPropertyInspectorAsync. The way settings are
    persisted is unchanged.
  • A small clockify-pi.js drives the cascading UI; the vendored EasyPI library is left
    untouched.

Backward compatibility

  • PluginSettings only gains four optional *Manual boolean flags (default false).
    Existing buttons keep working unchanged; stored values remain human-readable names.

Testing

  • Unit tests for the name-normalization logic (LookupMapping) pass.
  • Builds clean for win-x64.
  • Manually verified in the Stream Deck app: dropdowns populate after entering the API key,
    the cascade filters correctly, existing selections are restored, the freetext toggle
    round-trips across reopen, refresh works, and starting/stopping a timer still works.

@eXpl0it3r eXpl0it3r added the enhancement New feature or request label Jun 18, 2026
@eXpl0it3r

Copy link
Copy Markdown
Owner

Awesome, thank you!

I'm currently traveling, so it will take a bit for me to review this in full.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants